package cn.cljh.day9_19.service;

import cn.cljh.day9_19.dao.BookDao;
import cn.cljh.day9_19.pojo.Book;

import java.sql.SQLException;
import java.util.List;

public class BookServiceImpl implements BookService{
    BookDao bookDao=new BookDao();
    public boolean insert(Book book) throws SQLException{
        int insert = bookDao.insert(book);
        if (insert!=0){
            return true;
        }
        return false;
    }
    public List<Book> checkAll() throws SQLException{
        List<Book> books = bookDao.checkAll();
        return books;
    }
}
